Skip to main content
Version: 5.6

Licensing Service

This service can be used to add license information for a TimePunch Profile.

AddLicense

This method adds a TimePunch license to the internal license management.

ApplicationLicenseDto AddLicense(  
out TpFault fault,
TpAuthentication authentication,
string applicationKey,
string licensedFor,
string licenseCode);
Needed Permissioncore@logon
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeyCurrently not used!
licensedForLicense Name
licenseCodeLicense Code
return valueInformation about the currently added license

ExchangeLicense

This method exchanges an existing license for a new license. This can be useful for upgrades, when the old license is no longer needed, but the employees should be assigned one-to-one to the new license.

ApplicationLicenseDto ExchangeLicense(  
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
Guid applicationLicenseId,
string licensedFor,
string licenseCode);
Needed Permissionlicenses@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysSpecifies the application to add the license
applicationLicenseIdOld application license id to remove
licensedForLicense Name
licenseCodeLicense Code
return valueInformation about the currently added license

GetApplicationLicenses

This method returns the application licenses for the given application keys.

ApplicationLicenseDto[] GetApplicationLicenses(  
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys);
Needed Permissioncore@logon
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysSpecifies the application to retrieve license information for.
return valueApplication specific license information

GetLicensingState

This method checks the licensing of a single employee. It is also important to specify which licenses you want to search for. This is determined by the ApplicationKeys parameter. The actual licensed application key is returned. Example, a license for TimePunch PRO and PZE Watcher is searched for. If the employee has licensed the PZE Watcher, the application key for the Watcher is returned.

LicensingState GetLicensingState(  
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
out int daysLeft,
out string applicationKey);
Needed Permissioncore@logon
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysSpecifies the application to retrieve license information for.
daysLeftOutDefines how many days the license will be valid.
applicationKeyOutGets the application key for that the user owns a specific license.
return valueGets the licensing state of the user NoLicense, TestLicenseFound, TestLicenseExpired, LicenseFound, LicenseExpired, Undefined

IsLicenseUpgradeNeeded

This method checks whether the existing licenses can be updated to a new version of TimePunch. This is of particular interest for version-specific licenses, since these licenses are only valid for a certain version.

bool IsLicenseUpgradeNeeded (  
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
string version);
Needed Permission---
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysSpecifies the application to retrieve license information for.
versionVersion that shall be tested.
return valueTrue, if the current license is upgradable. E.g. the current version is 2.95 – the new version will be 3.2 which will than result in true as the return value.

RequestUpgradeOffer

If the result of the upgrade check is true (IsLicenseUpgradeable), you can use this method to request a quotation for the version upgrade. The method connects to TimePunch and transfers the license data so that an individual upgrade offer can be sent.

RequestOfferResult RequestUpgradeOffer(  
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
RequestUpgradeOfferDto requestUpgradeOffer);
Needed Permission---
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysSpecifies the application to retrieve license information for.
requestUpgradeOfferCustomer data used to send the upgrade offer
Return valueResult of the upgrade offer request Error, NoUpgradeNecessary, AutomaticOffer, ManualOffer

GetUserLicenses

This method returns all license data for the employees specified in the search object. It is important to specify which licenses to search. This is set by the parameter applicationKeys.

ApplicationKeys.UserLicenseDto[] GetUserLicenses(  
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
UserSearchDto searchDto);
Needed Permissioncore@logon
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysSpecifies the application to retrieve license information for.
searchDtoSearch object to specify the users for loading the license data.
return valueUser specific license information

RemoveLicenses

Using this method already inserted application licenses can be removed again.

void RemoveLicenses(  
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
Guid[] applicationLicenseIds);
Needed Permissionlicenses@manage
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysSpecifies the application to register the user
applicationLicenseIdsList containing the application license ids that shall be removed for the given application keys.

RegisterUsers

This method attempts to register the specified employee profiles for the application specified in the parameter applicationKeys. This will only work if for the employees still licenses are available.

void RegisterUsers(  
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
List<Guid> userIds);
Needed Permissioncore@logon
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysSpecifies the application to register the user
userIdsList containing the user ids that shall be registered for the given application keys.

UnregisterUsers

This method removes the license information for an employee. This removes only the licenses for the applications that are specified in the parameter applicationKeys.

void UnregisterUsers(  
out TpFault fault,
TpAuthentication authentication,
string[] applicationKeys,
List<Guid> userIds);
Needed Permissioncore@logon
NameModifierDescription
faultOutContains the error if an exception occurs.
authenticationUser authentication
applicationKeysSpecifies the application to un-register the user
userIdsList containing the user ids that shall be un-registered for the given application keys.